home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / comm2 / termsorc.lha / Extras / Source / gtlayout-source.lha / LTP_SearchKeys.c < prev    next >
C/C++ Source or Header  |  1995-09-24  |  924b  |  49 lines

  1. /*  GadTools layout toolkit
  2. **
  3. **  Copyright © 1993-1995 by Olaf `Olsen' Barthel
  4. **  Freely distributable.
  5. */
  6.  
  7. #include "gtlayout_global.h"
  8.  
  9. #ifdef DO_PICKSHORTCUTS
  10. VOID __regargs
  11. LTP_SearchKeys(LayoutHandle *handle,ObjectNode *group)
  12. {
  13.     ObjectNode    *node;
  14.     ULONG         page;
  15.  
  16.     SCANPAGE(group,node,page)
  17.     {
  18.         if(node -> Type == GROUP_KIND)
  19.             LTP_SearchKeys(handle,node);
  20.         else
  21.         {
  22.             if(node -> Key)
  23.             {
  24.                 WORD i;
  25.  
  26.                 for(i = 0 ; i < 256 ; i++)
  27.                 {
  28.                     if(LTP_Keys[0][i] == node -> Key || LTP_Keys[1][i] == node -> Key)
  29.                     {
  30.                         handle -> Keys[LTP_Keys[0][i]] = TRUE;
  31.                         handle -> Keys[LTP_Keys[1][i]] = TRUE;
  32.  
  33.                         break;
  34.                     }
  35.                 }
  36.  
  37.                 if(LTP_Keys[1][node -> Key])
  38.                     node -> Key = LTP_Keys[0][node -> Key];
  39.             }
  40.             else
  41.             {
  42.                 if((handle -> CursorKey == node) || (handle -> ReturnKey == node) || (handle -> EscKey == node) || (handle -> TabKey == node))
  43.                     node -> NoKey = TRUE;
  44.             }
  45.         }
  46.     }
  47. }
  48. #endif
  49.